package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class RuleCommoditySaveReq implements Serializable {

    @ApiModelProperty(value = "商品id",required = true)
    @NotNull(message = "商品id不可为空")
    private Long commodityId;

    @ApiModelProperty("商品名称")
    private String commodityName;

    @ApiModelProperty("规则积分")
    @Range(min = 0,message = "规则积分不允许为负数")
    private BigDecimal ruleValue;

    @ApiModelProperty("规格商品")
    private List<RuleCommoditySpecsSaveReq> list;
}
